import axios from "../utils/request";

//获取菜单类型
export function menuTypeJS() {
    return axios({
        method: "get",
        url: "Menu/GetMenuTypeInfo",
    })
}
//菜单添加
export function addMenuJS(data) {
    return axios({
        method: "post",
        url: "Menu/AddMeunInfo",
        data: data
    })
}
//获取菜单列表
export function getMenu() {
    return axios({
        method: "get",
        url: "Menu/GetMenuInfo",   
    })   
}
//单个删除菜单
export function MenuDelJS(data) {
    return axios({
        method: "delete",
        url: "Menu/DeleteMenu?id="+data,
    })
}
//反显(加载)菜单信息
export function getMenuByIdJS(data){
    return axios({
        method:"get",
        url:"Menu/GetMenuInfoById?id="+data,
    })
}
//编辑菜单
export function editMenuJS(data) {
    return axios({
        method: "put",
        url: "Menu/UpdateMenuInfo",
        data: data
    })
}

//根据登陆的用户角色获取可访问的菜单信息
export function getMenuRoute() {
    return axios({
        method: "get",
        url: "Menu/GetMenuRoute",
    })
}




